/* ============================================================
   COOPER GRIMM PORTFOLIO — STYLESHEET
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --bg:          #ffffff;
  --text:        #1a1a1a;
  --accent:      #5396BD;
  --accent-dark: #3e7ea6;
  --divider:     #cccccc;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', sans-serif;

  --nav-h:   110px;
  --pad-x:   64px;
  --gap:     14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img  { display: block; max-width: 100%; height: auto; object-fit: cover; }
a    { text-decoration: none; color: inherit; }


/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow .2s;
}
.navbar.scrolled { box-shadow: 0 1px 0 rgba(0,0,0,.08); }

.navbar__logo img { height: 100px; width: auto; object-fit: contain; display: block; }
.navbar__logo-text {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--text);
}

.navbar__nav   { display: flex; align-items: center; gap: 48px; }
.navbar__link  { font-size: 18px; font-weight: 400; color: var(--text); position: relative; transition: color .2s; }
.navbar__link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--text); transition: width .25s;
}
.navbar__link:hover::after,
.navbar__link--active::after { width: 100%; }

.navbar__social { display: flex; align-items: center; gap: 12px; margin-left: 4px; }
.navbar__social-link { display: flex; color: var(--text); transition: color .2s, transform .2s; }
.navbar__social-link:hover { color: var(--accent); transform: scale(1.1); }

/* Hamburger */
.navbar__hamburger {
  display: none; flex-direction: column; justify-content: space-between;
  width: 28px; height: 18px; background: none; border: none; cursor: pointer; padding: 0; z-index: 200;
}
.navbar__hamburger span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 1px; transition: transform .3s, opacity .3s; }

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: 0; background: var(--bg); z-index: 99;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 40px; padding-left: 50px;
  opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .3s, transform .3s;
}
.mobile-nav.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-nav__link { font-family: var(--font-display); font-size: 52px; letter-spacing: .04em; transition: color .2s; }
.mobile-nav__link:hover { color: var(--accent); }


/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  width: calc(100% - var(--pad-x) * 2);
  margin: 0 auto;
  height: 1px;
  background: var(--divider);
}


/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.hero {
  padding: 56px var(--pad-x) 52px;
  text-align: center;
}
.hero__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(48px, 7.5vw, 96px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--text);
}


/* ============================================================
   HOMEPAGE PROJECT GRID
   ============================================================ */
.grid-section { padding: 40px var(--pad-x) 80px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 416px);
  gap: 16px;
  justify-content: center;
}

.project-card {
  width: 100%;
  max-width: 416px;
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 416 / 235;
  background: #e0e0e0;
  cursor: pointer;
}
.project-card--empty { pointer-events: none; }

.project-card__img-wrap { position: relative; width: 100%; height: 100%; }
.project-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project-card:hover .project-card__img-wrap img { transform: scale(1.04); }

.project-card__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 24px 28px;
  background: linear-gradient(to top, rgba(0,0,0,.60) 0%, rgba(0,0,0,.12) 45%, transparent 100%);
  opacity: 0; transition: opacity .35s;
}
.project-card:hover .project-card__overlay { opacity: 1; }

.project-card__title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: .04em;
  color: #fff;
  line-height: 1.1;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 40px var(--pad-x); text-align: center; }
.footer__copy { font-family: var(--font-display); font-size: 24px; letter-spacing: .08em; color: var(--text); }


/* ============================================================
   PROJECT DETAIL — NON-WEB-BASED
   ============================================================ */
.pd-top {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 52px var(--pad-x) 40px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.pd-top__title {
  font-family: var(--font-display);
  font-size: 64px;
  letter-spacing: .04em;
  line-height: 1;
  margin-bottom: 24px;
  color: var(--text);
}

.pd-top__body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  max-width: 65ch;
  color: var(--text);
  margin-bottom: 20px;
}

/* Sidebar */
.pd-top__sidebar { padding-top: 4px; }

.pd-sidebar__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text);
}

.pd-sidebar__item { margin-bottom: 16px; font-size: 16px; line-height: 1.5; color: var(--text); }
.pd-sidebar__label { font-weight: 700; }
.pd-sidebar__value { font-weight: 400; }

/* Divider below header */
.pd-divider { margin-bottom: 32px; }

/* Full-width image block */
.pd-fullwidth {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 0 var(--pad-x);
}
.pd-fullwidth img {
  width: 100%;
  height: auto;
  max-height: 600px;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
  display: block;
}
.pd-fullwidth--last { margin-bottom: 64px; }

/* Two-column image row */
.pd-two-col {
  width: 900px;
  max-width: calc(100% - var(--pad-x) * 2);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.pd-two-col__item { border-radius: 6px; overflow: hidden; background: #ffffff; }
.pd-two-col__item img { width: 100%; height: auto; object-fit: contain; display: block; }


/* ============================================================
   PROJECT DETAILS — WEB-BASED
   ============================================================ */
.pd-cta {
  text-align: center;
  padding: 32px var(--pad-x) 40px;
}

.pd-cta-btn {
  display: inline-block;
  padding: 16px 48px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 20px;
  border-radius: 8px;
  transition: background .2s, transform .15s;
}
.pd-cta-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.pd-devices {
  padding: 40px var(--pad-x) 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.pd-device-phone {
  width: 200px;
  flex-shrink: 0;
}
.pd-device-phone img {
  width: 100%; height: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 24px;
  aspect-ratio: 9 / 19;
}

.pd-device-laptop {
  flex: 1;
  max-width: 680px;
  min-width: 300px;
}
.pd-device-laptop img {
  width: 100%; height: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
}


/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
    display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 64px var(--pad-x) 48px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}


.about-hero__photo {
  max-width: 592px;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: #d8d8d8;
}
.about-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-hero__text h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text);
}
.about-hero__text p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
}

.about-body {
  padding: 0 var(--pad-x) 48px;
  max-width: 1000px;
  margin: 0 auto;
}
.about-body p { font-family: var(--font-body); font-size: 18px; line-height: 1.7; color: var(--text); }

.about-resume { padding: 48px var(--pad-x) 80px; }
.about-resume__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 36px;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text);
}

.about-resume__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-resume__preview {
  border: 1.5px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  background: #f9f9f9;
  aspect-ratio: 8.5 / 11;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-resume__preview img { width: 100%; height: 100%; object-fit: contain; }
.about-resume__preview-placeholder { font-family: var(--font-body); font-size: 14px; color: #aaa; }

.about-resume__right { display: flex; flex-direction: column; gap: 24px; }
.about-resume__centered {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 24px;
}
.about-resume__blurb { font-family: var(--font-body); font-size: 18px; line-height: 1.65; color: var(--text); }

.btn-download {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 40px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 18px;
  border-radius: 8px;
  transition: background .2s, transform .15s;
}
.btn-download {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 14px 40px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 18px;
  border-radius: 8px;
  transition: background .2s, transform .15s;
}
.btn-download:hover { background: var(--accent-dark); transform: translateY(-1px); }


/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page { text-align: center; padding: 80px var(--pad-x) 0; }

.contact-page__title {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 96px);
  letter-spacing: .04em;
  color: var(--text);
  margin-bottom: 48px;
}

.contact-page__divider {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 32px;
  height: 1px;
  background: var(--divider);
}

.contact-page__sub {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 56px;
}

.contact-page__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 100px;
}

.contact-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 400;
  transition: background .2s, transform .15s;
}
.contact-link-btn:hover { background: var(--accent-dark); transform: translateY(-2px); }
.contact-link-btn svg { flex-shrink: 0; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --pad-x: 40px; }
  .pd-fullwidth { width: 100%; padding: 0 var(--pad-x); }
  .pd-two-col   { width: 100%; max-width: calc(100% - var(--pad-x) * 2); }
}

@media (max-width: 768px) {
  :root { --pad-x: 20px; --nav-h: 80px; }

  html, body { overflow-x: hidden; width: 100%; }

  /* Navbar */
  .navbar { padding: 0 20px; }
  .navbar__nav { display: none; }
  .navbar__hamburger { display: flex; }
  .navbar__logo img { height: 52px; }

  /* Mobile nav drawer */
  .mobile-nav { padding-left: 32px; }

  /* Hero */
  .hero { padding: 40px 20px 36px; }
  .hero__text { font-size: clamp(36px, 9vw, 56px); }

  /* Grid → single col */
  .grid-section { padding: 24px 20px 60px; }
  .project-grid { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .project-card { max-width: 100%; aspect-ratio: 416 / 235; }
  .project-card--empty { display: none; }
  .project-card__overlay { opacity: 1; }

  /* Project detail */
  .pd-top { grid-template-columns: 1fr; padding: 32px 20px 24px; gap: 28px; }
  .pd-top__title { font-size: 42px; }
  .pd-fullwidth { width: 100%; padding: 0 20px; }
  .pd-fullwidth img { max-height: none; }
  .pd-two-col { width: 100%; max-width: calc(100% - 40px); grid-template-columns: 1fr; }
  .pd-devices { flex-direction: column; align-items: center; padding: 24px 20px 60px; gap: 24px; }
  .pd-device-phone { width: 55%; max-width: 220px; }
  .pd-device-laptop { min-width: unset; width: 100%; }

  /* About */
  .about-hero { grid-template-columns: 1fr; padding: 40px 20px 32px; gap: 32px; }
  .about-hero__photo { max-width: 100%; aspect-ratio: 4 / 3; }
  .about-hero__text h1 { font-size: clamp(28px, 7vw, 42px); }
  .about-body { padding: 0 20px 36px; }
  .about-resume { padding: 36px 20px 60px; }
  .about-resume__grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-download { align-self: stretch; text-align: center; }

  /* Contact */
  .contact-page { padding: 60px 20px 0; }
  .contact-page__links { grid-template-columns: 1fr; max-width: 100%; margin-bottom: 60px; }
  .contact-link-btn { font-size: 20px; padding: 20px 24px; }

  /* Footer & divider */
  .footer { padding: 32px 20px; }
  .footer__copy { font-size: 18px; }
  .divider { width: calc(100% - 40px); }
}

@media (max-width: 480px) {
  :root { --pad-x: 16px; }
  .hero__text { font-size: 34px; }
  .pd-top__title { font-size: 36px; }
  .contact-page__title { font-size: 48px; }
}